package cn.com.cifi.mars.constant;

/**
 * 模块类型,业务类型
 * @author Li
 *
 */
public enum ModuleTypeEunm {
	
	PRICE("price","货值"),
	SUPPLY_PLAN("supply_plan","供货"), 
	SIGN_PLAN("sign_plan","签约"),
	RETUEN_PLAN("return_plan","回款")
    ;
	
    private String key;
    private String value;

    ModuleTypeEunm(String key,String value) {
        this.key = key;
        this.value = value;
    }
    
    
    public static String getValueByKey(String key){
        for(ModuleTypeEunm versionTypeEunm:ModuleTypeEunm.values()){
            if(key.equals(versionTypeEunm.getKey())){
                return versionTypeEunm.getValue();
            }
        }
        return  null;
    }

    public static String getKey(String key){
        for(ModuleTypeEunm versionTypeEunm:ModuleTypeEunm.values()){
            if(key.equals(versionTypeEunm.getValue())){
                return versionTypeEunm.getKey();
            }
        }
        return  null;
    }


    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }

}
